﻿using System;
using System.Data;
using System.Collections.Generic;

using Maticsoft.Common;
using CustomsSystem.Model;
using CustomsSystem.DAL;

namespace CustomsSystem.BLL
{
	/// <summary>
    /// ContactManage
	/// </summary>
	public partial class ContactManage
	{
		private readonly ContactService dal=new ContactService();

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        public DataSet GetList()
        {
            return dal.GetList(string.Empty);
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public CustomsSystem.Model.Contact GetModel(int ID)
        {
            return dal.GetModel(ID);
        }
        public CustomsSystem.Model.Contact GetModel(DataTable dt)
        {
            return dal.DataRowToModel(dt.Rows[0]);
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(CustomsSystem.Model.Contact model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(CustomsSystem.Model.Contact model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int ID)
        {
            return dal.Delete(ID);
        }

	}
}

